package com.gagakuai.bpm.service.camunda;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.gagakuai.bpm.domian.entity.camuda.ActHiActinst;
import com.gagakuai.bpm.domian.entity.camuda.WorkFlowTaskNode;
import com.gagakuai.bpm.domian.query.camunda.WorkflowQuery;


import java.util.List;

public interface WorkFlowTaskNodeService {


    int deleteByPrimaryKey(String id);

    int insert(WorkFlowTaskNode record);

    int insertOrUpdate(WorkFlowTaskNode record);

    int insertOrUpdateSelective(WorkFlowTaskNode record);

    int insertSelective(WorkFlowTaskNode record);

    WorkFlowTaskNode selectByPrimaryKey(String id);

    int updateByPrimaryKeySelective(WorkFlowTaskNode record);

    int updateByPrimaryKey(WorkFlowTaskNode record);

    int updateBatch(List<WorkFlowTaskNode> list);

    int batchInsert(List<WorkFlowTaskNode> list);


    /*
     * @param processId 流程Id
     * @return {@link IPage<  WorkFlowTaskNode >}
     * @Author houhong
     * @Description //TODO 根据流程Id 获取流程办理轨迹
     * @Date 3:25 下午 2022/3/22
     */
    IPage<ActHiActinst> getTraceByProcesssIdPage(WorkflowQuery queryDto, String processId) throws Exception;


    /*
     * @param taskId
     * @param userId
     * @return {@link Integer}
     * @Author houhong
     * @Description //TODO 获取活跃数目
     * @Date 2:25 下午 2022/4/29
     * @Param * @param processId
     */
    Integer getRuTaskNumByuserName(String processId, String taskId, String userId);

    /*
     * @param userId
     * @return {@link Integer}
     * @Author houhong
     * @Description //TODO 获取taskId
     * @Date 2:25 下午 2022/4/29
     * @Param processId
     */
    String getTaskIdByUserAndProcessIn(String processId, String userId);



    /*
     * @return {@link Integer}
     * @Author houhong
     * @Description //TODO 获取流程状态
     * @Date 2:25 下午 2022/4/29
     * @Param processId
     */
    String getProcessStatus(String processId);
}

